<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编写日报</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/js/jquery.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/js/myAjax.js"></script>
    <script src="../../js/utlis/edit.js"></script>
</head>
<body>
<div style="display: flex;justify-content: center;  margin-top: 10px;">
    <div style="border:3px solid #276f58; padding: 10px">
        <div type="hidden" id="dailyId"></div>
        <div style="display: flex;justify-content: center">
            <div style="margin-left: 10px">姓名：<input type="text" readonly id="name" style="height: 30px;"></div>
            <div style="margin-left: 10px">日期：<input type="text" readonly id="writeTime" style="height: 30px;"></div>
            <div style="margin-left: 10px">班主任：<input type="text" readonly id="classTeacher"style="height: 30px;"></div>
            <div style="margin-left: 10px">教练：<input type="text" readonly id="coach" style="height: 30px;"></div>
        </div>
        <div style="margin-top: 20px">
            <div>学习内容：</div>
            <div><textarea type="text" readonly id="content" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>收获：</div>
            <div><textarea type="text" readonly id="reap" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>不足：</div>
            <div><textarea type="text" readonly id="deficiency" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
        <div style="margin-top: 20px">
            <div>意见反馈：</div>
            <div><textarea type="text" readonly id="suggestion" placeholder="请输入内容" style="width: 100%;height: 100px"></textarea></div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use("layer");
    findById();
    function findById() {
     let id = sessionStorage.getItem("dailyId");
     let result = myAjax('/d/daily/findById','post',{id:id});
     if (result.code===200){
         $("#name").val(result.data.name);
         $('#classTeacher').val(result.data.classTeacher);
         $("#coach").val(result.data.coach);
         $("#writeTime").val(result.data.writeTime);
         $("#content").val(result.data.content);
         $("#reap").val(result.data.reap);
         $("#suggestion").val(result.data.suggestion);
         $("#deficiency").val(result.data.deficiency);
     }else {
         layer.msg("查询失败");
     }
    }
</script>
</html>